<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .con{
            background: url("123.png");
            height: 280px;
            width: 180px;
        }
        .con .son{
            text-align: center;
        }
        .con .son > span{
            color: #fff;
            line-height: 30px;
            text-align: center;
            width: 30px;
            display: inline-block;
            background: black;
            opacity: .8;
            font-weight: 800;
            font-size: 20px;
            padding: .2rem;
        }
        .con .son i{
            outline: none;
            color: #fff;
            font-style: normal;
            font-weight: 600;
        }
        .con h1{
            line-height: 110px;
            color: #fff;
            text-align: center;
        }
        .con p{
            line-height: 40px;
            margin-top: 50px;
            color: #fff;
            text-align: center;
            font-weight: 600;
        }
    </style>
</head>
<body>
<div class="con">
    <h1>京东秒杀</h1>
    <p>十月一大卖场 倒计时</p>
    <div class="son">
        <span id="a">00</span>
        <i>:</i>
        <span id="b">00</span>
        <i>:</i>
        <span id="c">00</span>
    </div>

</div>

<script>
      function  gettime() {
          var newDate = new Date('2019/9/28 00:00:00');
          var date = new Date();
          var dang = newDate.getTime() - date.getTime();
          if(dang > 0){
              var u = Math.floor(dang/1000/60/60);
              var y = Math.floor(dang/1000/60%60);
              var m = Math.floor(dang/1000%60);
              var a = document.querySelector('#a').innerHTML = u;
              var b = document.querySelector('#b').innerHTML = y;
              var c = document.querySelector("#c").innerHTML = m;
          }else{
              var a = document.querySelector('#a').innerHTML = "结";
              var b = document.querySelector('#b').innerHTML = "束";
              var c = document.querySelector("#c").innerHTML = "了";
          }
    }
    gettime()
    var asd = setInterval(gettime,1000);

</script>
</body>
</html>